package edu.sctu.practice.class02.yangshengyu.three10;

import java.util.Scanner;

/**
 * Created by Cullen on 2015/8/13.
 */
public class N39 {
    public static void main(String[] args) {
        System.out.print("请输入n的值：");
        Scanner input = new Scanner(System.in);
        double n = input.nextDouble();
        double b = 0;
        double c = 0;
        double sum = 0;
        for (c = 1; c <= n; c++) {
            b = b + c;
            sum = sum + 1 / b;
        }
        System.out.print(sum);
    }

}